import service from '@/utils/request'


// 获取单个应收款信息
export const useReceiveApi = (id: Number) => {
	return service.get('/receivables/' + id)
}

// 新增or修改应收款信息
export const useReceiveSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.post('/receivables/update', dataForm)
	} else {
		return service.post('/receivables/save', dataForm)
	}
}
// 下載發票
export const downloadInvoice = (dataForm: any) => {
	return service.post('/receivables/downloadInvoice', dataForm,
	{
		responseType: 'blob'
	})
}
